<?php
	XHTML::Form('/'.$this->name.'/edit/');
	$this->helpers->htmlx->MenuText1(LANG_SYSTEM_ACCESS_LOGS, "edit.gif");
	
	echo "<table class='grid ui-widget ui-widget-content' style = 'margin-top: 5px; '>";
	
	    //header
		echo "<tr class = 'ui-widget-header'>";
			$this->helpers->htmlx->td(ucfirst(LANG_TABLE_NAME), ' class = "gridHeader" style = "padding: 3px; " ');
			$this->helpers->htmlx->td(ucfirst(LANG_LOGGED), ' class = "gridHeader" style = "padding: 3px; " align = "center"');	 
			$this->helpers->htmlx->td(ucfirst(LANG_COMMENTED), ' class = "gridHeader" style = "padding: 3px; " align = "center"'); 	
	    echo "</tr>";

	    //tables list
	    $i = 1;
	    foreach ($this->data['accesses_logs'] as $access_logs)
	    {
            //row style
	    	$cellStyle = 'gridCell';
	    	
	    	echo "<tr class = 'gridRow'>";
	    	
	    	    //table name (translated)
	    		echo "<td class='$cellStyle' align='left'>";
	    		    echo Language::Get(str_replace('LANG_', '', $access_logs['language_constant']), 'CAPITALIZE').' ';
		    		XHTML::Anchor('/system_tables_columns_logs/edit/'.$access_logs['system_table_id'], "[columns]", array('style' => 'color: #3491C7; '));
		    	echo "</td>";
		    	
		    	//is logged
		    	echo "<td class='$cellStyle' align='center'>";
		    		XHTML::InputCheckbox('access_logs['.$access_logs['id'].'][is_logged]', 1, $access_logs['is_logged'], 'id="is_logged'.$access_logs['id'].'"  "onclick="if(!this.checked) document.getElementById(\'is_commented'.$access_logs['id'].'\').checked=checked"');   		
		    	echo "</td>";
		    	
		    	//is commented
		    	echo "<td class='$cellStyle' align='center'>";
		    		XHTML::InputCheckbox('access_logs['.$access_logs['id'].'][is_commented]', 1, $access_logs['is_commented'], 'id="is_commented'.$access_logs['id'].'"  "onclick="if(this.checked) document.getElementById(\'is_logged'.$access_logs['id'].'\').checked=checked" ' );   		
		    	echo "</td>";
		    	 
		    	XHTML::InputHidden('access_logs['.$access_logs['id'].'][id]', $access_logs['id']);
		    	
	    	echo "</tr>";
	    	$i++;
	    }
	    
	echo "</table>";
	
	$this->helpers->htmlx->SubmitTable('submit', '/systemaccesslogs/edit/');
	echo "</form>";
?>